<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .testClass{
            font-size: 64px;
            font-weight: bolder;
            color: red;
        }
    </style>
</head>
<body>
    <a href="" onmouseover="testOver()" onmouseout="testOut()">充值</a>

    <script>
        function testOver() {
            var a = document.getElementsByTagName("a")[0];
            /* a.style.fontSize = "64px";
            a.style.fontWeight = "bolder";
            a.style.color = "red"; */
            a.className = "testClass";
        }
        function testOut() {
            var a = document.getElementsByTagName("a")[0];
            a.className = "";
        }
    </script>
</body>
</html>